from rest_framework.decorators import api_view
from rest_framework.request import Request
from rest_framework.response import Response

from api.serializers.hot_keyword_serializer import HotKeywordSerializer
from app.models.hot_keyword import HotKeyword


@api_view(['GET'])
def get_hot_keywords(request: Request):
    queryset = HotKeyword.objects.all()
    return Response(HotKeywordSerializer(list(queryset), many=True).data)
